package com.webSite.demo.cy.indie.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.webSite.demo.cy.bean.HomeAbout;
import com.webSite.demo.cy.mapper.HomeAboutMapper;
import com.webSite.demo.cy.service.CommonService;

@Controller  
@EnableAutoConfiguration
public class AboutController {

	@Autowired
	HomeAboutMapper homeAboutMapper;
	@Autowired
	CommonService commonService;
	
	@RequestMapping("/about.html")
    String about(Model model) {
		//模板信息
		HomeAbout about = homeAboutMapper.findLimitOne();
		model.addAttribute("about", about);
		model.addAttribute("MetaList", commonService.findMete("走进我们"));
		model.addAttribute("menu", "about");
        return "about";
    }
}
